package com.ttx.ch06;

import com.ttx.ch04.Dish;

import java.util.stream.Collectors;

public class CollectTest {
    public static void main(String[] args) {
        test1();
    }

    private static void test1() {
        Dish.getDishs().stream()
                .collect(Collectors.groupingBy(Dish::getType))
                .forEach((a, b) -> System.out.println(b));
    }
}
